package com.ce.pms.log4ce;

import java.util.Map;

import org.aspectj.lang.JoinPoint;

import com.ce.component.log4ce.aop.constructor.support.AbstractOriginalObjectHolder;
import com.ce.component.log4ce.aop.constructor.support.OriginalObjectHolder;
import com.ce.component.log4ce.aop.parser.BizLogParser;
import com.ce.pms.customer.vo.IndividualVO;
import com.ce.pms.house.vo.HouseVO;

public class MemberDeleteHolder extends AbstractOriginalObjectHolder implements OriginalObjectHolder {

	private Log4ceHelper log4ceHelper = Log4ceHelper.getInstance();
	@Override
	protected Map<String, Object> getOriginalObjects(JoinPoint joinPoint, BizLogParser logParser) {

		Map<String,Object> map = logParser.getLogArguments(joinPoint);

		Long paticpantId = (Long)map.get("paticpantId");
		Long houseId = (Long)map.get("houseId");

		//获取家庭成员信息
		IndividualVO memberInfo = log4ceHelper.getCustomerService().findIndividualById(paticpantId);
		HouseVO houseInfo = log4ceHelper.getHouseService().getFlatHouseById(houseId);
		//房号
		map.put("memberInfo", memberInfo);
		map.put("houseInfo", houseInfo);



		return map;
	}
}
